package com.teamwings.ctrls;

import lombok.Data;

/**
 * 控件内部字段
 * 如果字典，有字典编号，字典名称，字典代码
 */
@Data
public class FieldInternal implements IField {

    private String fieldName;
    private String fieldType;
    private String fieldTypeValue;
    private Boolean isAllowNull = true;

    public FieldInternal(String name, String type, String typeValue) {
        this.fieldName = name;
        // 获取数据类型
        // 如果数据库有字段类型冲突，在这里做兼容
        this.fieldType = type;
        this.fieldTypeValue = "(" + typeValue + ")";
    }

    @Override
    public boolean withQuote() {
        return false;
    }

    @Override
    public String withQuote(String val) {
        return null;
    }
}
